﻿

namespace Mulala.Cavan.Application.MainBoundedContext.ConsignModule
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using Mulala.Cavan.Application.Seedwork;
    using Mulala.Cavan.Domain.MainBoundedContext.ConsignModule;
    using Mulala.Cavan.Domain.MainBoundedContext.SearchModule;
    using Mulala.Cavan.Domain.Seedwork;
    using Mulala.Cavan.Domain.MainBoundedContext.NannyModule;
    using Mulala.Cavan.Domain.MainBoundedContext.ProprietorModule;

    public interface IConsignAppService : IBaseAppService<Consign, ConsignSearch>
    {
        BoolGenericResult<Consign> UpdateConsignStatus(Consign changedConsign, ConsignIdentifier.ConsignStatus changedConsignStatus);

        BoolGenericResult<ConsignBidder> AddConsignBidder(Consign consign, Nanny nanny);

        BoolGenericResult<ConsignBidder> AddConsignBidderByProprietor(Consign consign, Nanny nanny, Proprietor prorietor);

        BoolGenericResult<ConsignBidder> UpdateConsignBidderStatusToCancel(Consign consign, Nanny nanny, bool isToCancel);

        BoolGenericResult<ConsignBidder> UpdateConsignBidderStatusToAccept(Consign consign, Nanny nanny);

        BoolResult UpdateConsignBidder(ConsignBidder changedConsignBidder);

        IList<Consign> GetConsignsByProprietor(int id);

        IList<ConsignBidder> GetConsignsByNanny(int id);

        IList<ConsignBidder> GetConsignsByCorporation(int id);

        IList<ConsignBidder> GetConsignBiddersByProprietor(int id);

        IList<Consign> GetConsignsByCondition(ConsignSearch searchParams, out long total);

        IList<Consign> GetConsignsBySearch(ConsignSearch searchParams);

        IList<Consign> GetConsignByKeyword(string keyword, int currentPage, out long total);

        long GetConsignBidderCount(ConsignBidderSearch search);
    }
}
